﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.Infrastructure.Attr;
using WCS.Infrastructure.Dto.Request.Divided;
using WCS.Infrastructure.Dto.Request.Payment;
using WCS.Infrastructure.Dto.Response.Common;
using WCS.Infrastructure.Dto.Response.Payment;

namespace WCS.Service.Interface
{
    [Provider]
    public interface IDividedService
    {
        /// <summary>
        /// 在分账协议里面批量设置收款码（该协议下的收款码列表与目标集合对齐）
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> SetDividedAgreementPaymentCodesAsync(SetDividedAgreementPaymentCodesRequestDto dto);

        /// <summary>
        /// 新增分账协议
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddDividedAgreementAsync(DividedAgreementRequestDto dto);

        /// <summary>
        /// 获取分账协议列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>

        Task<ApiResult> GetDividedAgreementListAsync(DividedAgreementRequestDto dto);

        /// <summary>
        /// 获取单个分账协议详细信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetDividedAgreementAsync(string id);

        /// <summary>
        /// 编辑分账协议
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateDividedAgreementAsync(DividedAgreementRequestDto dto);

        /// <summary>
        /// 禁用/启用分账协议
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResult> BanDividedAgreementAsync(BanDividedAgreementRequestDto dto);

        /// <summary>
        /// 删除分账协议
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteDividedAgreementAsync(DividedAgreementRequestDto dto);

        /// <summary>
        /// 获取当前用户相关的分账协议列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetUserRelatedDividedAgreementsAsync(DividedAgreementUserQueryDto dto);

        /// <summary>
        /// 新增分账协议详情
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddDividedAgreementDetailAsync(DividedAgreementDetailRequestDto dto);

        /// <summary>
        /// 删除分账协议详情
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> DeleteDividedAgreementDetailAsync(DividedAgreementDetailRequestDto dto);

        /// <summary>
        /// 修改分账协议详情
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateDividedAgreementDetailAsync(DividedAgreementDetailRequestDto dto);

        /// <summary>
        /// 批量修改分账协议详情
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateDividedAgreementDetailsAsync(List<DividedAgreementDetailRequestDto> dto);

        /// <summary>
        /// 获取分账协议详情列表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ApiResult> GetDividedAgreementDetailListAsync(string dividedAgreementId);

        /// <summary>
        /// 确认分账协议详情
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> ConfirmDividedAgreementDetailAsync(DividedAgreementDetailRequestDto dto);

        /// <summary>
        /// 新增分账记录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> AddDividedRecordAsync();

        /// <summary>
        /// 更新分账记录并结算
        /// </summary>
        /// <param name="dividedTime"></param>
        /// <returns></returns>
        Task<ApiResult> UpdateDividedRecordAsync(DateTime? dividedTime);

        /// <summary>
        /// 获取分账记录报表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetDividedRecordReportAsync(DividedRecordQueryRequestDto dto);

        /// <summary>
        /// 获取用户分账记录列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetDividedRecordListAsync(DividedRecordQueryRequestDto dto);

        /// <summary>
        /// 获取商户分账记录列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ApiResult> GetMerchantDividedRecordListAsync(DividedRecordQueryRequestDto dto);

        /// <summary>
        /// 获取用户分账记录详情树状图
        /// </summary>
        /// <param name="dividedRecordId"></param>
        /// <returns></returns>
        Task<ApiResult> GetDividedRecordTreeForUserAsync(string dividedRecordId);

        /// <summary>
        /// 获取完整分账树状图（使用静态快照比例）
        /// </summary>
        Task<ApiResult> GetDividedRecordFullTreeByOrderIdAsync(string? orderId, string? dividedRecordId);

        /// <summary>
        /// 获取分账记录根层详情
        /// </summary>
        /// <param name="dividedRecordId"></param>
        /// <returns></returns>
        Task<ApiResult> GetDividedRecordRootLayerAsync(string dividedRecordId);

        /// <summary>
        /// 获取分账记录详情列表
        /// </summary>
        /// <param name="dividedRecordId"></param>
        /// <returns></returns>
        Task<ApiResult> GetDividedRecordDetailListAsync(string dividedRecordId);
    }
}
